package grafoS;

/**
 * Gcol is a program to help users to learn a little about graph coloring, in
 * this software, you can learn some coloring algorithms, and add your own
 * algorithm for coloring.You can also learn BFS and DFS search. This tool, also
 * support the .col format from DIMACS (Center for Discrete Mathematics and
 * Theoretical Computer Science), so you can import a big graph and use all the
 * algorithms. Copyright (C) <2015> Clóvis Daniel Souza Silva, Samuel Silva de
 * Souza, Professor Leonardo Sampaio Rocha.
 * 
* This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
* This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
* You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 * 
 * contact: projetoGrafos@gmail.com
 */
/**
 * This class is used to model a instance of adjacency. It will be used to keep
 * one vertex and his next adjacency in the adjacency list.
 *
 * @author Daniel
 * @author Samuel
 */
public class Adjacencia {

    private Vertice dado;
    private Adjacencia prox;

    /**
     * @param v vertex to be kept
     */
    public Adjacencia(Vertice v) {
        this.dado = v;

    }

    /**
     * @return vertex kept by this object adjacency.
     */
    public Vertice getDado() {
        return dado;
    }

    /**
     * @return his next adjacency in the adjacency list.
     */
    public Adjacencia getProx() {
        return prox;
    }

    /**
     * set the vertex to be kept by this object adjacency
     *
     * @param dado vetex to be kept
     */
    public void setDado(Vertice dado) {
        this.dado = dado;
    }

    /**
     * set next adjacency in the adjacency list.
     *
     * @param prox next object adjacency list to be kept.
     */
    public void setProx(Adjacencia prox) {
        this.prox = prox;
    }
}
